/***********************************************************
 *  File_Name  : XJCharCode.h
 *  File_Path   : 
 *  File_Encode : UTF8
 *  Description : 字符串，字符集转换
 *  
 *  OS : Linux, UNIX
 *  LastVersion  : 20130903
 *      
 *  Author      : LiXiujie(李秀杰)
 *  Date        : 2012-9-3
 *  Version     : 20130903
 *  Description : 
 *                
 *  Edit Author : 
 *  Edit Date   : 
 *  Version     : 
 *  Description :
 *                
 ***********************************************************/

#ifndef XJCHARCODE_H_
#define XJCHARCODE_H_

namespace XJUtilClass{
class XJCharCode {
public:
	XJCharCode();
	virtual ~XJCharCode();
public:
	static int utf8togb2312(char *inbuf,int inlen,char *outbuf,int outlen);
	static int gb2312toutf8(char *inbuf,int inlen,char *outbuf,int outlen);
	static int utf8togbk(char *inbuf,int inlen,char *outbuf,int outlen);
	static int gbktoutf8(char *inbuf,int inlen,char *outbuf,int outlen);
private:
	static int code_convert(char *from_charset,char *to_charset,char *inbuf,int inlen,char *outbuf,int outlen);
};
} //namespace XJUtilClass
#endif /* XJCHARCODE_H_ */
